package com.netease.yunxin.kit.chatkit.ui.view.useful

import android.view.LayoutInflater
import android.view.ViewGroup

import com.compass.framework.adapter.BaseBindViewHolder
import com.compass.framework.adapter.BaseRecyclerViewAdapter
import com.netease.yunxin.kit.chatkit.ui.databinding.LayoutUsefulExpressionsBinding
import com.netease.yunxin.kit.chatkit.ui.model.UsefulExpressions

/**
 * Description： 常用语adapter
 * Date:2023/12/4 10:59
 */
class UsefulExpressionsAdapter :
    BaseRecyclerViewAdapter<UsefulExpressions, LayoutUsefulExpressionsBinding>() {
    override fun onBindDefViewHolder(
        holder: BaseBindViewHolder<LayoutUsefulExpressionsBinding>,
        item: UsefulExpressions?,
        position: Int
    ) {
        if (item == null) return
        holder.binding.apply {
            tvName.text = item.name
        }

    }

    override fun getViewBinding(
        layoutInflater: LayoutInflater,
        parent: ViewGroup,
        viewType: Int
    ): LayoutUsefulExpressionsBinding {
        return LayoutUsefulExpressionsBinding.inflate(layoutInflater, parent, false)
    }
}